home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cocktail
/
r2l.lha
/
r2l
/
m2c
/
Makefile
< prev
next >
Wrap
Makefile
|
1992-08-18
|
2KB
|
104 lines
BIN = $(HOME)/bin
LIB = $(HOME)/lib
OPT = -O
CC = cc
# C library (reuse)
REUSE = ../../reuse/m2c
# C libraries
CLIBS = $(REUSE)/libreuse.a
# options for C compiler
CFLAGS = -w -I$(REUSE) $(OPT)
MFLAGS = -c
all: r2l
install: r2l r2l.sh $(LIB)/r2l
if test $(LIB) = $(BIN); then echo error: BIN = LIB; false; else true; fi
sed 's;LIB;$(LIB);g' < r2l.sh > $(BIN)/r2l
chmod a+rx $(BIN)/r2l
install -c -s -m 755 r2l $(LIB)/r2l
install -c -m 644 Scanner.Tab $(LIB)/r2l
install -c -m 644 Parser.Tab $(LIB)/r2l
# installation directories
$(LIB)/r2l: $(LIB)
sh -c "if test ! -d $(LIB)/r2l; then mkdir $(LIB)/r2l; else true; fi"
# swap all byte pairs of the files Scanner.Tab and Parser.Tab
bin.conv:
dd conv=swab < Scanner.Tab > .Scanner.Tab; mv .Scanner.Tab Scanner.Tab
dd conv=swab < Parser.Tab > .Parser.Tab; mv .Parser.Tab Parser.Tab
# SYSTEM_ = SYSTEM_.o
# HEAD
sources : DefTable.h
sources : DefTable.c
DefTable.o : DefTable.c DefTable.h
sources : Errors.h
sources : Errors.c
Errors.o : Errors.c Errors.h
sources : Parser.h
sources : Parser.c
Parser.o : Parser.c Parser.h
Parser.o : Scanner.h
Parser.o : Errors.h
Parser.o : Errors.h
Parser.o : DefTable.h
sources : Scanner.h
sources : Scanner.c
Scanner.o : Scanner.c Scanner.h
Scanner.o : Errors.h
sources : r2l.c
all : r2l
r2l.o : r2l.c
r2l.o : Scanner.h
r2l.o : Parser.h
SYSTEM_.o : SYSTEM_.c SYSTEM_.h
r2l : $(SYSTEM) \
r2l.o \
Parser.o \
DefTable.o \
Errors.o \
Scanner.o \
; $(CC) $(CFLAGS) -o r2l $(SYSTEM) \
r2l.o \
Parser.o \
DefTable.o \
Errors.o \
Scanner.o \
$(CLIBS)
# TAIL
clean :
rm -f core *.o
.SUFFIXES: .md .mi .h .c .o
.mi.c:
mtc $(MFLAGS) $*.mi;
.md.h:
mtc $(MFLAGS) $*.md;
.c.o:
$(CC) $(CFLAGS) -c $*.c;